<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: CTcpIoServer类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="#pri-methods">Private 成员函数</a> &#124;
<a href="class_c_tcp_io_server-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">CTcpIoServer类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>tcp io服务端服务类  
 <a href="class_c_tcp_io_server.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a235b3dd749f09084c3065c1def0ceda8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#a235b3dd749f09084c3065c1def0ceda8">CTcpIoServer</a> (bool isWriteLog=false)</td></tr>
<tr class="memdesc:a235b3dd749f09084c3065c1def0ceda8"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造一个tcp io服务类  <a href="class_c_tcp_io_server.html#a235b3dd749f09084c3065c1def0ceda8">更多...</a><br /></td></tr>
<tr class="separator:a235b3dd749f09084c3065c1def0ceda8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c621e5b8b881659a103010542a480e3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#a5c621e5b8b881659a103010542a480e3">~CTcpIoServer</a> ()</td></tr>
<tr class="memdesc:a5c621e5b8b881659a103010542a480e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">销毁一个tcp io服务类  <a href="class_c_tcp_io_server.html#a5c621e5b8b881659a103010542a480e3">更多...</a><br /></td></tr>
<tr class="separator:a5c621e5b8b881659a103010542a480e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef555ccb9b2f3323c317aea533969442"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_c_sock_error.html">CSockError</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#aef555ccb9b2f3323c317aea533969442">Init</a> (<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;sock, bool isServer=false)</td></tr>
<tr class="memdesc:aef555ccb9b2f3323c317aea533969442"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化套接字与服务类设备进行绑定  <a href="class_c_tcp_io_server.html#aef555ccb9b2f3323c317aea533969442">更多...</a><br /></td></tr>
<tr class="separator:aef555ccb9b2f3323c317aea533969442"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7d8f89bea7573233ee25d4802ae2ab1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#ad7d8f89bea7573233ee25d4802ae2ab1">Run</a> ()</td></tr>
<tr class="memdesc:ad7d8f89bea7573233ee25d4802ae2ab1"><td class="mdescLeft">&#160;</td><td class="mdescRight">运行服务  <a href="class_c_tcp_io_server.html#ad7d8f89bea7573233ee25d4802ae2ab1">更多...</a><br /></td></tr>
<tr class="separator:ad7d8f89bea7573233ee25d4802ae2ab1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab89e49a1bf4a21c54951e4ae63b456b0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#ab89e49a1bf4a21c54951e4ae63b456b0">Run_One</a> ()</td></tr>
<tr class="memdesc:ab89e49a1bf4a21c54951e4ae63b456b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">运行一次服务  <a href="class_c_tcp_io_server.html#ab89e49a1bf4a21c54951e4ae63b456b0">更多...</a><br /></td></tr>
<tr class="separator:ab89e49a1bf4a21c54951e4ae63b456b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addea632498b2adb1a24972ffc6c25231"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#addea632498b2adb1a24972ffc6c25231">NotifyStop</a> ()</td></tr>
<tr class="memdesc:addea632498b2adb1a24972ffc6c25231"><td class="mdescLeft">&#160;</td><td class="mdescRight">通知服务停止  <a href="class_c_tcp_io_server.html#addea632498b2adb1a24972ffc6c25231">更多...</a><br /></td></tr>
<tr class="separator:addea632498b2adb1a24972ffc6c25231"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad2df98fa7b30265cccde64871cc7747"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#aad2df98fa7b30265cccde64871cc7747">IsStop</a> () const</td></tr>
<tr class="memdesc:aad2df98fa7b30265cccde64871cc7747"><td class="mdescLeft">&#160;</td><td class="mdescRight">服务是否停止  <a href="class_c_tcp_io_server.html#aad2df98fa7b30265cccde64871cc7747">更多...</a><br /></td></tr>
<tr class="separator:aad2df98fa7b30265cccde64871cc7747"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a754a0959529230be473651babd43e221"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#a754a0959529230be473651babd43e221">WaitServerStop</a> ()</td></tr>
<tr class="memdesc:a754a0959529230be473651babd43e221"><td class="mdescLeft">&#160;</td><td class="mdescRight">通知服务停止并等待  <a href="class_c_tcp_io_server.html#a754a0959529230be473651babd43e221">更多...</a><br /></td></tr>
<tr class="separator:a754a0959529230be473651babd43e221"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0e29bdab15b44c4ea6c9a246424865f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_c_basic_service.html">CBasicService</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#ad0e29bdab15b44c4ea6c9a246424865f">GetTcpServicePtr</a> ()</td></tr>
<tr class="memdesc:ad0e29bdab15b44c4ea6c9a246424865f"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取底层服务类  <a href="class_c_tcp_io_server.html#ad0e29bdab15b44c4ea6c9a246424865f">更多...</a><br /></td></tr>
<tr class="separator:ad0e29bdab15b44c4ea6c9a246424865f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">投递一个接收连接请求</div></td></tr>
<tr><td colspan="2"><div class="groupText"><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">svrSock</td><td>受监听的套接字 </td></tr>
    <tr><td class="paramname">cliSock</td><td>已连接的套接字类 </td></tr>
    <tr><td class="paramname">func</td><td>完成回调函数 </td></tr>
    <tr><td class="paramname">invoker</td><td>用户传递的回调数据 </td></tr>
  </table>
  </dd>
</dl>
</div></td></tr>
<tr class="memitem:a6fb652948c48295b25b72617abf38c0b"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:a6fb652948c48295b25b72617abf38c0b"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#a6fb652948c48295b25b72617abf38c0b">AsyncAccept</a> (<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;svrSock, <a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;cliSock, const Func &amp;func)</td></tr>
<tr class="separator:a6fb652948c48295b25b72617abf38c0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63108bad232b26132e9c8759603d7db4"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:a63108bad232b26132e9c8759603d7db4"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#a63108bad232b26132e9c8759603d7db4">AsyncAccept</a> (<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;svrSock, <a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;cliSock, const Func &amp;func, void *invoker)</td></tr>
<tr class="separator:a63108bad232b26132e9c8759603d7db4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">投递一个接收请求</div></td></tr>
<tr><td colspan="2"><div class="groupText"><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>已连接的套接字类 </td></tr>
    <tr><td class="paramname">buff</td><td>接收缓冲 </td></tr>
    <tr><td class="paramname">func</td><td>完成回调函数 </td></tr>
    <tr><td class="paramname">invoker</td><td>用户传递的数据 </td></tr>
  </table>
  </dd>
</dl>
</div></td></tr>
<tr class="memitem:a2bdfa5d49968abaa4018c5d39955a62e"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:a2bdfa5d49968abaa4018c5d39955a62e"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#a2bdfa5d49968abaa4018c5d39955a62e">AsyncRead</a> (<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;sock, const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;buff, Func func)</td></tr>
<tr class="separator:a2bdfa5d49968abaa4018c5d39955a62e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ee80a54a511c4a688b9f125571086f2"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:a4ee80a54a511c4a688b9f125571086f2"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#a4ee80a54a511c4a688b9f125571086f2">AsyncRead</a> (<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;sock, const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;buff, Func func, void *invoker)</td></tr>
<tr class="separator:a4ee80a54a511c4a688b9f125571086f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">投递一个写请求</div></td></tr>
<tr><td colspan="2"><div class="groupText"><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>已连接的套接字类 </td></tr>
    <tr><td class="paramname">buff</td><td>发送缓冲 </td></tr>
    <tr><td class="paramname">func</td><td>完成回调函数 </td></tr>
    <tr><td class="paramname">invoker</td><td>用户传递的数据 </td></tr>
  </table>
  </dd>
</dl>
</div></td></tr>
<tr class="memitem:a5c551ad1e1a62d0527bdbfa37dbdc73b"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:a5c551ad1e1a62d0527bdbfa37dbdc73b"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#a5c551ad1e1a62d0527bdbfa37dbdc73b">AsyncSend</a> (<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;sock, const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;buff, const Func &amp;func)</td></tr>
<tr class="separator:a5c551ad1e1a62d0527bdbfa37dbdc73b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d57fa6836c9b6a1bbb87f48234e0dba"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:a3d57fa6836c9b6a1bbb87f48234e0dba"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#a3d57fa6836c9b6a1bbb87f48234e0dba">AsyncSend</a> (<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;sock, const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;buff, const Func &amp;func, void *invoker)</td></tr>
<tr class="separator:a3d57fa6836c9b6a1bbb87f48234e0dba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">投递一个中断请求</div></td></tr>
<tr><td colspan="2"><div class="groupText"><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">func</td><td>完成回调函数 </td></tr>
    <tr><td class="paramname">invoker</td><td>用户传递的数据 </td></tr>
  </table>
  </dd>
</dl>
</div></td></tr>
<tr class="memitem:ae9c8a68befcda8eebb21c5d655eb439f"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:ae9c8a68befcda8eebb21c5d655eb439f"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#ae9c8a68befcda8eebb21c5d655eb439f">Post</a> (const Func &amp;func)</td></tr>
<tr class="separator:ae9c8a68befcda8eebb21c5d655eb439f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d079536f01361ca5731dbb56636047a"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:a1d079536f01361ca5731dbb56636047a"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#a1d079536f01361ca5731dbb56636047a">Post</a> (const Func &amp;func, void *invoker)</td></tr>
<tr class="separator:a1d079536f01361ca5731dbb56636047a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:a16425af907976af975345df6666c6b16"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt; <a class="el" href="class_c_tcp_server.html">CTcpServer</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#a16425af907976af975345df6666c6b16">_service</a></td></tr>
<tr class="separator:a16425af907976af975345df6666c6b16"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private 成员函数</h2></td></tr>
<tr class="memitem:afcb6a119f5c281a29caba2bdc3550a9c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_server.html#afcb6a119f5c281a29caba2bdc3550a9c">delete_class_copy_operator</a> (<a class="el" href="class_c_tcp_io_server.html">CTcpIoServer</a>)</td></tr>
<tr class="separator:afcb6a119f5c281a29caba2bdc3550a9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>tcp io服务端服务类 </p>

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00011">11</a> 行定义.</p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a235b3dd749f09084c3065c1def0ceda8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a235b3dd749f09084c3065c1def0ceda8">&#9670;&nbsp;</a></span>CTcpIoServer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CTcpIoServer::CTcpIoServer </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>isWriteLog</em> = <code>false</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>构造一个tcp io服务类 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">isWriteLog</td><td>是否打印内部调试日志 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00019">19</a> 行定义.</p>

</div>
</div>
<a id="a5c621e5b8b881659a103010542a480e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c621e5b8b881659a103010542a480e3">&#9670;&nbsp;</a></span>~CTcpIoServer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CTcpIoServer::~CTcpIoServer </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>销毁一个tcp io服务类 </p>

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00024">24</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a6fb652948c48295b25b72617abf38c0b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fb652948c48295b25b72617abf38c0b">&#9670;&nbsp;</a></span>AsyncAccept() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoServer::AsyncAccept </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>svrSock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>cliSock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Func &amp;&#160;</td>
          <td class="paramname"><em>func</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00046">46</a> 行定义.</p>

</div>
</div>
<a id="a63108bad232b26132e9c8759603d7db4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a63108bad232b26132e9c8759603d7db4">&#9670;&nbsp;</a></span>AsyncAccept() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoServer::AsyncAccept </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>svrSock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>cliSock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Func &amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00050">50</a> 行定义.</p>

</div>
</div>
<a id="a2bdfa5d49968abaa4018c5d39955a62e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2bdfa5d49968abaa4018c5d39955a62e">&#9670;&nbsp;</a></span>AsyncRead() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoServer::AsyncRead </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;&#160;</td>
          <td class="paramname"><em>buff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Func&#160;</td>
          <td class="paramname"><em>func</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00064">64</a> 行定义.</p>

</div>
</div>
<a id="a4ee80a54a511c4a688b9f125571086f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ee80a54a511c4a688b9f125571086f2">&#9670;&nbsp;</a></span>AsyncRead() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoServer::AsyncRead </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;&#160;</td>
          <td class="paramname"><em>buff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Func&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00068">68</a> 行定义.</p>

</div>
</div>
<a id="a5c551ad1e1a62d0527bdbfa37dbdc73b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c551ad1e1a62d0527bdbfa37dbdc73b">&#9670;&nbsp;</a></span>AsyncSend() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoServer::AsyncSend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;&#160;</td>
          <td class="paramname"><em>buff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Func &amp;&#160;</td>
          <td class="paramname"><em>func</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00082">82</a> 行定义.</p>

</div>
</div>
<a id="a3d57fa6836c9b6a1bbb87f48234e0dba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d57fa6836c9b6a1bbb87f48234e0dba">&#9670;&nbsp;</a></span>AsyncSend() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoServer::AsyncSend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;&#160;</td>
          <td class="paramname"><em>buff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Func &amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00086">86</a> 行定义.</p>

</div>
</div>
<a id="afcb6a119f5c281a29caba2bdc3550a9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afcb6a119f5c281a29caba2bdc3550a9c">&#9670;&nbsp;</a></span>delete_class_copy_operator()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CTcpIoServer::delete_class_copy_operator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_server.html">CTcpIoServer</a>&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="ad0e29bdab15b44c4ea6c9a246424865f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0e29bdab15b44c4ea6c9a246424865f">&#9670;&nbsp;</a></span>GetTcpServicePtr()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_basic_service.html">CBasicService</a>* CTcpIoServer::GetTcpServicePtr </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取底层服务类 </p>

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00142">142</a> 行定义.</p>

</div>
</div>
<a id="aef555ccb9b2f3323c317aea533969442"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aef555ccb9b2f3323c317aea533969442">&#9670;&nbsp;</a></span>Init()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_sock_error.html">CSockError</a> CTcpIoServer::Init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>isServer</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>初始化套接字与服务类设备进行绑定 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>与服务端进行绑定的套接字 </td></tr>
    <tr><td class="paramname">isServer</td><td>初始化类型 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回SUCC，失败返回相应的错误码 </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>只有使用监听、绑定函数的套接字isServer才需要设置为true,否则使用默认值 </dd></dl>

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00033">33</a> 行定义.</p>

</div>
</div>
<a id="aad2df98fa7b30265cccde64871cc7747"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad2df98fa7b30265cccde64871cc7747">&#9670;&nbsp;</a></span>IsStop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CTcpIoServer::IsStop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>服务是否停止 </p>
<dl class="section return"><dt>返回</dt><dd>停止服务返回true,未停止返回false </dd></dl>

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00132">132</a> 行定义.</p>

</div>
</div>
<a id="addea632498b2adb1a24972ffc6c25231"></a>
<h2 class="memtitle"><span class="permalink"><a href="#addea632498b2adb1a24972ffc6c25231">&#9670;&nbsp;</a></span>NotifyStop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoServer::NotifyStop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>通知服务停止 </p>

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00124">124</a> 行定义.</p>

</div>
</div>
<a id="ae9c8a68befcda8eebb21c5d655eb439f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae9c8a68befcda8eebb21c5d655eb439f">&#9670;&nbsp;</a></span>Post() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoServer::Post </td>
          <td>(</td>
          <td class="paramtype">const Func &amp;&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00098">98</a> 行定义.</p>

</div>
</div>
<a id="a1d079536f01361ca5731dbb56636047a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d079536f01361ca5731dbb56636047a">&#9670;&nbsp;</a></span>Post() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoServer::Post </td>
          <td>(</td>
          <td class="paramtype">const Func &amp;&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00102">102</a> 行定义.</p>

</div>
</div>
<a id="ad7d8f89bea7573233ee25d4802ae2ab1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7d8f89bea7573233ee25d4802ae2ab1">&#9670;&nbsp;</a></span>Run()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CTcpIoServer::Run </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>运行服务 </p>
<dl class="section return"><dt>返回</dt><dd>成功返回true,失败返回false </dd></dl>

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00111">111</a> 行定义.</p>

</div>
</div>
<a id="ab89e49a1bf4a21c54951e4ae63b456b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab89e49a1bf4a21c54951e4ae63b456b0">&#9670;&nbsp;</a></span>Run_One()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CTcpIoServer::Run_One </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>运行一次服务 </p>
<dl class="section return"><dt>返回</dt><dd>成功返回true，失败返回false </dd></dl>

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00119">119</a> 行定义.</p>

</div>
</div>
<a id="a754a0959529230be473651babd43e221"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a754a0959529230be473651babd43e221">&#9670;&nbsp;</a></span>WaitServerStop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoServer::WaitServerStop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>通知服务停止并等待 </p>

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00137">137</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="a16425af907976af975345df6666c6b16"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16425af907976af975345df6666c6b16">&#9670;&nbsp;</a></span>_service</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt;<a class="el" href="class_c_tcp_server.html">CTcpServer</a>&gt; CTcpIoServer::_service</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a> 第 <a class="el" href="_tcp_io_server_8h_source.html#l00146">146</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>H:/project/LibTools/src/socket/<a class="el" href="_tcp_io_server_8h_source.html">TcpIoServer.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
